{% extends "album/base.html" %}

{% block title %}
    短剧
{% endblock %}

{% block page_title %}
    短剧 - 详情
{% endblock %}

{% block header_actions %}
    <div class="page-actions">
        <a href="{{ url_for('album_info.edit',id=album_info.get('id')) }}" class="btn btn-primary">
            <i class="fa fa-edit"></i> 编辑
        </a>
    </div>
{% endblock %}

{% block body %}
    <div class="form-container">
        <div class="form-section">
            <h3 class="section-title">基本信息</h3>
            <div class="form-grid">
                <div class="form-group">
                    {{ form.title.label(class="form-label") }}
                    {{ form.title(class="form-input") }}
                </div>
                <div class="form-group">
                    {{ form.seq_num.label(class="form-label") }}
                    {{ form.seq_num(class="form-input") }}
                </div>
                <div class="form-group">
                    {{ form.release_year.label(class="form-label") }}
                    {{ form.release_year(class="form-input") }}
                </div>
                <div class="form-group">
                    {{ form.album_status.label(class="form-label") }}
                    {{ form.album_status(class="form-input") }}
                </div>
                <div class="form-group">
                    {{ form.covers.label(class="form-label") }}
                    {{ form.covers() }}
                    <div class="flex gap-2">
                        <div id="CoversContainer" class="flex flex-wrap gap-2 p-1"></div>
                    </div>
                </div>
                <div class="form-group">
                    {{ form.recommendation.label(class="form-label") }}
                    {{ form.recommendation(class="form-input") }}
                </div>
                <div class="form-group">
                    {{ form.introduction.label(class="form-label") }}
                    {{ form.introduction(class="form-input") }}
                </div>
                <div class="form-group">
                    {{ form.tags.label(class="form-label") }}
                    {{ form.tags() }}
                    <!-- 标签显示区域 -->
                    <div id="tagsContainer" class="flex flex-wrap gap-2 pt-3 bg-gray-50 rounded-lg">
                    </div>
                </div>
                <div class="form-group">
                    {{ form.qualification.label(class="form-label") }}
                    {{ form.qualification(class="form-input") }}
                </div>
            </div>
        </div>
        <div class="form-section" id="form_record">
            <h3 class="section-title">资质信息</h3>
            <div class="form-grid">
                <div class="form-group">
                    {{ form.license_num.label(class="form-label") }}
                    {{ form.license_num(class="form-input") }}
                </div>
                <div class="form-group">
                    {{ form.registration_num.label(class="form-label") }}
                    {{ form.registration_num(class="form-input") }}
                </div>
                <div class="form-group">
                    {{ form.ordinary_record_num.label(class="form-label") }}
                    {{ form.ordinary_record_num(class="form-input") }}
                </div>
                <div class="form-group">
                    {{ form.key_record_num.label(class="form-label") }}
                    {{ form.key_record_num(class="form-input") }}
                </div>
            </div>
        </div>
        <div class="form-section">
            <h3 class="section-title">备案材料</h3>
            <div class="form-grid">
                <div class="form-group">
                    {{ form.name.label(class="form-label") }}
                    {{ form.name(class="form-input") }}
                </div>
                <div class="form-group">
                    {{ form.duration.label(class="form-label") }}
                    {{ form.duration(class="form-input") }}
                </div>
                <div class="form-group">
                    {{ form.seqs_count.label(class="form-label") }}
                    {{ form.seqs_count(class="form-input") }}
                </div>
                <div class="form-group">
                    {{ form.production_organisation.label(class="form-label") }}
                    {{ form.production_organisation(class="form-input") }}
                </div>
                <div class="form-group">
                    {{ form.director.label(class="form-label") }}
                    {{ form.director(class="form-input") }}
                </div>
                <div class="form-group">
                    {{ form.producer.label(class="form-label") }}
                    {{ form.producer(class="form-input") }}
                </div>
                <div class="form-group">
                    {{ form.actor.label(class="form-label") }}
                    {{ form.actor(class="form-input") }}
                </div>
                <div class="form-group">
                    {{ form.summary.label(class="form-label") }}
                    {{ form.summary(class="form-input") }}
                </div>
                <div class="form-group">
                    {{ form.cost_distribution_uri.label(class="form-label") }}
                    {{ form.cost_distribution_uri() }}
                    <div class="flex gap-2">
                        <div id="CostDistributionContainer" class="flex flex-wrap gap-2 p-1"></div>
                    </div>
                </div>
                <div class="form-group">
                    {{ form.assurance_uri.label(class="form-label") }}
                    {{ form.assurance_uri() }}
                    <div class="flex gap-2">
                        <div id="AssuranceContainer" class="flex flex-wrap gap-2 p-1"></div>
                    </div>
                </div>
                <div class="form-group">
                    {{ form.playlet_production_cost.label(class="form-label") }}
                    {{ form.playlet_production_cost(class="form-input") }}
                </div>
                <div class="form-group">
                    {{ form.screen_writer.label(class="form-label") }}
                    {{ form.screen_writer(class="form-input") }}
                </div>
            </div>
        </div>
        <div class="form-section">
            <h3 class="section-title">广电备案信息</h3>
            <div class="form-grid">
                <div class="form-group">
                    {{ form.record_type.label(class="form-label") }}
                    {{ form.record_type(class="form-input") }}
                </div>
                <div class="form-group">
                    {{ form.broadcast_record_number.label(class="form-label") }}
                    {{ form.broadcast_record_number(class="form-input") }}
                </div>
            </div>
        </div>
    </div>

    <script src="{{ url_for('static', filename='js/album.js') }}"></script>
    <script>
        initContainer(false);
    </script>
{% endblock %}